/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import Model.Ruta;
import Model.RutaCamino;
import Principals.Main;

/**
 *
 * @author sebastian
 */
public class RutaDAO {
    
    public static Ruta registrarRuta(Ruta objRuta){
        Main.usrSesion.session.beginTransaction() ;
        Main.usrSesion.session.save( objRuta ) ;
        Main.usrSesion.session.getTransaction().commit() ;
        return objRuta ;
    }
    
    public static RutaCamino registrarRutaCamino( RutaCamino rCamino ){
        Main.usrSesion.session.beginTransaction() ;
        Main.usrSesion.session.save( rCamino ) ;
        Main.usrSesion.session.getTransaction().commit() ;
        return rCamino ;
    }
    
}
